# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-thready
_pkgname=thready
pkgver=0.1.5
pkgrel=1
pkgdesc='Simple wrapper for threaded execution.'
arch=('any')
url='https://pypi.org/project/thready/#files'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9f6a5a712dd2db3ad6e5f335a6c07a72da6ed27e7796138079e5bd18c07631c568a6af6e93ff9bf0442831f4f770c6159c1abff4e4d1abae9b49c9429ed9303d')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

